/*
Jack Morris
11/20/14
Chapter 5
Page 96
Assinment 1
*/
#include <stdio.h>

int main()
{
  int a, b;
  printf("enter a number: ");
  scanf("%d", &a);
  if (a < 0)
  {
    a = a * -1;
  }
  if (a < 10)
  {
    b = 1;
  }
  else if (a < 100)
  {
    b = 2;
  }
  else if (a < 1000)
  {
    b = 3;
  }
  else if (a < 10000)
  {
    b = 4;
  }
  printf("The number %d has %d digits", a, b);
}